<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="inc/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <%@ include file="inc/meta.jsp" %>
    <meta name="description" content="">
    <meta name="author" content="">
    <title>微音详情</title>
    <%@ include file="inc/css.jsp" %>
</head>
<style>
    .paddingTop {
        padding-top: 6.5px;
    }
</style>

<body>

<div id="posts" class="wrapper">

    <%@ include file="inc/nav.jsp" %>

    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">微音列表</h1>
                <h4 style="margin-left: 10px;" id="showH">——查看微音</h4>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <input type="hidden" id="commentSourceId" value="${broadcast.id}"/>
                        <input type="hidden" id="commentType" value="2"/>

                        <form class="form-horizontal nice-validator n-default" role="form" novalidate="novalidate">
                            <c:if test="${null != broadcast.user}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">用户头像:</label>

                                    <div class="col-sm-4" style="padding-top: 6.5px;">
                                        <img src="${broadcast.user.avatar}" height="120px" width="120px"/>
                                    </div>
                                </div>
                            </c:if>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户名称:</label>

                                <div class="col-sm-4" style="padding-top: 6.5px;">
                                    <c:if test="${null != broadcast.user}">
                                        ${broadcast.user.nickName}
                                    </c:if>
                                    <c:if test="${null == broadcast.user}">
                                        管理员
                                    </c:if>
                                </div>
                            </div>

                            <c:if test="${null != broadcast.user.region}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">用户所在地:</label>

                                    <div class="col-sm-4 paddingTop">
                                            ${broadcast.user.region.city.province.name}${broadcast.user.region.city.name}
                                    </div>
                                </div>
                            </c:if>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">发送时间:</label>

                                <div class="col-sm-4 paddingTop">
                                    ${createTime}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">微音标题:</label>

                                <div class="col-sm-4" style="padding-top: 6.5px;">
                                    ${broadcast.title}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">微音内容:</label>

                                <div class="col-sm-4" style="padding-top: 6.5px;">
                                    <audio controls="controls">
                                        <source src="${broadcast.url}" type="audio/mpeg">
                                    </audio>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">微音时长:</label>

                                <div class="col-sm-4" style="padding-top: 6.5px;">
                                    ${duration}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">评论数:</label>

                                <div class="col-sm-6 paddingTop">
                                    ${broadcast.commentNum}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">点赞数:</label>

                                <div class="col-sm-6 paddingTop">
                                    ${broadcast.praiseNum}
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-12" style="text-align: center">
                                    <a href="backend/broadcast/index" type="button" class="btn btn-primary">返回</a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!-- /.panel -->
            </div>
        </div>

        <jsp:include page="评论列表.jsp"/>

    </div>
    <!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->

<%@ include file="inc/footer.jsp" %>

</body>

</html>